import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/components/pages/index'
import UpdateCard from '@/components/pages/updateCard'
import MainPlanList from '@/components/pages/mainPlanList'
import RepaymentPlan from '@/components/pages/repaymentPlan'
import RepaymentPlanList from '@/components/pages/repaymentPlanList'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect:"index",
      component: Index,
      meta:{
        title:"信用卡管理"
      }
    },
    {
      path: '/index/:token?',
      name: 'index',
      component: Index,
      meta:{
        title:"信用卡管理",
        backNative:true
      }
    },
    {
      path:"/updateCard/:cardNo?",
      name:"updateCard",
      component:UpdateCard,
      meta:{
        title:"修改卡信息"
      }
    },
    {
      path:"/mainPlanList/:cardNo?",
      name:"mainPlanList",
      component:MainPlanList,
      meta:{
        title:"计划主任务列表"
      }
    },
    {
      path:"/repaymentPlan/:cardNo?",
      name:"repaymentPlan",
      component:RepaymentPlan,
      meta:{
        title:"设置还款计划"
      }
    },
    {
      path:"/repaymentPlanList/:cardNo?",
      name:"repaymentPlanList",
      component:RepaymentPlanList,
      meta:{
        title:"计划列表"
      }
    },
  ]
})
